package com.treasure.web.command.request.chat;

import com.treasure.common.exception.ParameterException;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author sunhongmin
 * @date 2023/9/1 10:59
 * @description
 */
@Data
public class ChatHistoryDetailRequest implements Serializable {
    /**
     * 会话ID
     * @required
     */
    private Integer interactionId;

    /**
     * 当前页
     */
    private Integer page = 1;

    /**
     * 每页条目
     */
    private Integer pageSize = 20;

    public void valiadate() {
        if (Objects.isNull(interactionId)) {
            throw new ParameterException("会话ID不能为空");
        }
    }
}
